<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <css file="__PUBLIC__/Css/public.css"/>
        <js href="__PUBLIC__/Js/jquery-1.7.2.min.js" />
        <script type="text/javascript">
            function delPost(id,title){
                $.ajax({
                    type: "POST",
                    url: "{:U('Post/del')}",
                    cache: false,
                    dataType:"json",
                    data: {'id':id},
                    beforeSend:function(XMLHttpRequest)
                    {
                        if (!confirm('确认要删除 '+title+'？')) {
                            return false;
                        }
                    },
                    success: function(result){
                        if (result['status'] == 1) {
                            window.location.reload();
                        } else {
                            alert(result['info']);
                        }
                    },
                    error: function(){
                        alert('请求服务器失败');
                    }
                });

//GROUP_NAME . '/Post/del',array('id'=>))
            }
        </script>
    </head>
    <body>
        <table class='table' style='margin-top: 0px;'>
            <tr>
               
                <td align='right'>
                    <div style='float:left;'>位置: <a href="__GROUP__/Post">文章列表</a></div>
                    <a href="__GROUP__/Post/addUi">发布文章</a>
                </td>

            </tr>
            
        </table>
        <br/>
        <form action="__GROUP__/Cate/sort" method="post">
            <table class="table">
                <tr>
                    <th>ID</th><th>标题</th><th>分类</th><th>发布时间</th><th>点击</th><th>关键字</th><th>排序</th><th>操作</th>
                </tr>
                <volist name="list" id="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.title}</td>
                        <td>{$vo.c_id}</td>
                        <td>{$vo.add_time|date='Y-m-d',###}</td>
                        <td>{$vo.click}</td>
                        <td>{$vo.keyword}</td>
                        <td>{$vo.sort}</td>
                        <td>
                           
                            <a href="{:U(GROUP_NAME . '/Post/editUi',array('id'=>$vo['id']))}">[修改]</a>
                            <a href="javascript:;" onclick='delPost("{$vo['id']}","{$vo['title']}");'>[删除]</a>
                            
                        </td>
                    </tr>

                </volist>
                <tr><td colspan="8" align="left">{$page}</td></tr>
                <tr><td colspan="8" align="center"><input type="submit" value="排序"/></td></tr>

            </table>
        </form>
    </body>
</html>
